package flc.ast.adapter;

import android.view.View;

import androidx.annotation.NonNull;

import com.blankj.utilcode.util.FileUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;

public class RecordAudioAdapter extends StkProviderMultiAdapter<String> {

    public RecordAudioAdapter() {
        addItemProvider(new RecordAudioItemProvider());
    }

    private class RecordAudioItemProvider extends BaseItemProvider<String> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_sel_audio;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, String bean) {
            baseViewHolder.setText(R.id.tvSelAudioName, FileUtils.getFileName(bean));
            baseViewHolder.getView(R.id.ivSelAudioSel).setVisibility(View.GONE);
        }
    }
}
